# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=androidpincrack
pkgver=2.ddaf307
pkgrel=4
groups=('blackarch' 'blackarch-mobile' 'blackarch-cracker')
pkgdesc='Bruteforce the Android Passcode given the hash and salt.'
arch=('any')
url='https://github.com/PentesterES/AndroidPINCrack'
license=('MIT')
makedepends=('git')
depends=('python2')
source=("$pkgname::git+https://github.com/PentesterES/AndroidPINCrack.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed -i 's|bin/python|bin/python2|' "$pkgname.py"
}

package() {
  cd $pkgname

  install -Dm 755 "$pkgname.py" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

